package com.base.cn.platform.os.service.exam.type;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.exam.ExamBaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 试卷类型接口
 *
 * @author s.li
 * @date 2018/12/04
 */
@FeignClient(name = ExamBaseService.appName,configuration = FeignAuthConfig.class)
public interface ExamTypeService extends ExamBaseService {

    /**
     * 保存试卷类型数据
     * @param examType 试卷类型属性对象
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath +  "/saveExamType")
    Map<String,Object> saveExamType(@RequestBody Map<String, Object> examType);

    /**
     * 通过ID，查询试卷类型对象
     * @param condition 查询条件对象
     * @return ExamType
     */
    @RequestMapping(contextPath + "/findExamTypeById")
    Map<String,Object> findExamTypeById(@RequestBody Map<String, Object> condition);

    /**
     * 多条件查询试卷类型列表
     * @param condition 查询条件
     * @return List<ExamType>
     */
    @RequestMapping(contextPath + "/findExamTypeList")
    List<Map<String,Object>> findExamTypeList(@RequestBody Map<String, Object> condition);

    /**
     * 分页查询试卷类型
     * @param condition 查询条件
     * @param currentPage 页码
     * @param pageSize 查询数量
     * @return  PageInfo<ExamType>
     */
    @RequestMapping(contextPath + "/findExamTypeListPage")
    Map<String,Object> findExamTypeListPage(@RequestBody Map<String, Object> condition,
                                            @RequestParam("currentPage") int currentPage,
                                            @RequestParam("pageSize") int pageSize);

    /**
     * 修改试卷类型状态
     * @param ids 试卷类型ID 串
     * @param status 状态 1.正常 2.禁用 3.删除
     */
    @RequestMapping(contextPath + "/updateExamTypeStatus")
    Map<String,Object> updateExamTypeStatus(@RequestParam("ids") String ids,
                                            @RequestParam("status") int status);
}
